import request from '@/utils/request'

export const getPayMethodPageApi = async (params: any) => {
    return request.get('/pay-method', { params })
}

export const getPayMethodOptionListApi = async () => {
    return request.get('/pay-method/option-list')
}

export const getPayMethodByIdApi = async (id: string) => {
    return request.get(`/pay-method/${id}`)
}

export const createPayMethodApi = async (data: any) => {
    return request.post('/pay-method', data)
}

export const updatePayMethodApi = async (id: any, data: any) => {
    return request.put(`/pay-method/${id}`, data)
}

export const deletePayMethodApi = async (id: string) => {
    return request.delete(`/pay-method/${id}`)
}
